package com.myth;

import java.util.Arrays;

public class MaoPao {
    public static void main(String[] args) {
        int[] a = {23,24,54252,52,252,65,88,768,8,589,45,45,5,76,52,352,52};
        int[] b = maoPao(a);
        System.out.println(Arrays.toString(b));
        Arrays.sort(a);
        System.out.println(Arrays.toString(a));
    }

    public static int[] maoPao(int[] arry){
        int i,j;
        int tep = 0;
        for (i = 0;i < arry.length-1;i++){
            for (j = 0;j < arry.length-i-1;j++){
                if(arry[j] > arry[j+1]){
                    tep = arry[j+1];
                    arry[j+1] = arry[j];
                    arry[j] = tep;
                }
            }
        }
        return arry;
    }



}
